package org.example;

import java.util.concurrent.TimeUnit;

/**
 * @author LanWP
 * @date 2024-07-08
 */
public class ThreadUtils {

    public static void sleep(int seconds) {

        try {
            Thread.sleep(seconds * 1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void sleep(int num, TimeUnit unit) {
        try {
            Thread.sleep(unit.toMillis(num));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
